window.$=function(s,ctx=document){
	return ctx.querySelector(s);
};





const fetchPost=function(url,opt){
	return fetch(url,Object.assign({
		method:'post',
		headers:{
			"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"
		},
		mode:"same-origin",
		credentials:"same-origin",
		cache:"no-cache",
		redirect:"follow",
		referrer:"client"
	},opt)).then(resp=>{
		if(resp.ok){
			return resp.json();
		}else{
			console.error("请求错误",resp);
			return Response.error();
		}
	});
}